<section>

    <div class="topBox" *ngIf="tagData.name===changePwdModalTag">
        <img src="assets/img/close.png" class="close-btn" onerror="this.src='assets/img/close.png'" appDebounceClick
            (debounceClick)="closeModal()" />
    </div>

    <form [formGroup]="form">
        <div class="mt45 ml30 mb30 title">
            <h1 class="f36 bold">{{tagData.data.title}}</h1>
        </div>
        <ion-list>
            <ion-item style="cursor: inherit;pointer-events: all;" *ngIf="tagData.data.mvcode">
                <ion-input type="mobile" formControlName="account" [(ngModel)]="mobileNum" [placeholder]="tagData.data.account.placeholder?tagData.data.account.placeholder:'请输入手机号码'"
                    maxlength="11" required [disabled]="isLogin"></ion-input>
                <span *ngIf="form.value.account && !isLogin" appDebounceClick (debounceClick)="mobileNum=''"
                    class="close r90"></span>
                <button class="vccode" *ngIf="time>-1" [disabled]="time>-1"
                    [ngClass]="{'lightgrey':time>-1}">（{{time}}）重新获取</button>
                <button [ngClass]="{'lightgrey':form.get('account').errors}" class="vccode" *ngIf="time===-1"
                    [disabled]="form.get('account').errors" appDebounceClick
                    (debounceClick)="getVC(form.get('account').errors)">{{text}}</button>
            </ion-item>
            <!-- <ion-text color="danger" class="ml18" *ngIf="form.get('account').dirty && form.get('account').errors">
            请输入正确的手机号码
        </ion-text> -->
            <ion-item *ngIf="tagData.data.mvcode">
                <ion-input required type="number" formControlName="mvcode" [(ngModel)]="mvcode" maxlength="6"
                    onInput="if(value.length>4)value=value.slice(0,6)" [placeholder]="tagData.data.mvcode.placeholder?tagData.data.mvcode.placeholder:'请输入验证码'"></ion-input>
                <span *ngIf="form.value.mvcode" appDebounceClick (debounceClick)="mvcode=''" class="close"></span>
            </ion-item>
            <!-- <ion-text color="danger"  class="ml18"  *ngIf="form.get('mvcode').dirty && form.get('mvcode').errors">
            请输入正确的验证码
        </ion-text> -->
            <!-- <ion-item lines="full">
            <ion-input required type="text" formControlName="username" [(ngModel)]="usernameNum" placeholder="请输入姓名"></ion-input>
            <span *ngIf="form.value.username"  appDebounceClick (debounceClick)="usernameNum=''" class="close"></span>
        </ion-item>
        <ion-text color="danger" *ngIf="form.get('username').dirty && form.get('username').errors">
            请输入姓名
        </ion-text> -->
            <ion-item>
                <ion-input required type="{{open?'text':'password'}}" maxlength="30" [(ngModel)]="passwordNum"
                    formControlName="password" [placeholder]="tagData.data.password.placeholder?tagData.data.password.placeholder:'请输入新密码'"></ion-input>
                <span *ngIf="form.value.password" appDebounceClick (debounceClick)="passwordNum=''"
                    class="close r50"></span>
                <span class="eye" appDebounceClick (debounceClick)="open=!open" [ngClass]="{'eyeshow':open}"></span>
            </ion-item>
            <!-- <ion-text color="danger"  class="ml18" *ngIf="form.get('password').dirty && form.get('password').errors">
            请输入正确的密码
        </ion-text> -->
            <ion-item>
                <ion-input required type="{{open1?'text':'password'}}" maxlength="30" [(ngModel)]="passwordNum1"
                    formControlName="password1" [placeholder]="tagData.data.password.placeholder?'请再次'+tagData.data.password.placeholder:'请再次输入新密码'"></ion-input>
                <span *ngIf="form.value.password1" appDebounceClick (debounceClick)="passwordNum1=''"
                    class="close r50"></span>
                <span class="eye" appDebounceClick (debounceClick)="open1=!open1" [ngClass]="{'eyeshow':open1}"></span>
            </ion-item>
            <!-- <ion-text color="danger" class="ml18" *ngIf="passwordNum1!==passwordNum">
        两次输入的密码不一致
     </ion-text> -->
            <ng-container *ngIf="appTypeCustom==='LJ'">
                <ion-button type="button" color="laijian" class="register-btn btn" [disabled]="!form.valid"
                    expand="block" appDebounceClick (debounceClick)="submit()">
                    <label class="change-pwd-label">
                        更改密码
                    </label>
                </ion-button>
            </ng-container>
            <ng-container *ngIf="appTypeCustom!='LJ'">
                <ion-button type="button" color="gold" [ngClass]="{'orange':form.valid}" [disabled]="!form.valid"
                    class="register-btn btn" expand="block" appDebounceClick (debounceClick)="submit()">
                    更改密码
                </ion-button>
            </ng-container>
            <!-- [ngClass]="{'orange':form.valid}" [disabled]="!form.valid" -->
        </ion-list>
    </form>
</section>